<?php

namespace App\Http\Controllers;

use App\Models\District;
use Illuminate\Http\Request;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\Validator as FacadesValidator;

class DistrictsController extends BaseController
{
    use ValidatesRequests;

    public function list($parent_id){
        $district = District::query()->where("parent_id", $parent_id)->get(["name", "code", "id"]);
        return resSucc($district, "城市列表");
    }
}
